const express = require('express')
const app = express()
app.get('/api/msg', (req, res) => {
  res.send({
    code: 0,
    data: ['我是测试数据']
  })
})

app.post('/api/post', (req, res) => {
  res.send({
    code: 0,
    data: '我是post测试数据'
  })
})

app.listen(3000, () => {
  console.log(`server port is 3000`)
})